<template>
<div>
  <button @click="addfn">数量加1</button>
  <div>数量:{{counrs.count}}</div>
</div>
</template>

<script lang="ts" setup name="count">
import { useCounterStore } from "@/store/count.js";
let counrs = useCounterStore();
function addfn(){
  counrs.increment()
}
</script>

<style>
</style>